/**
 * Copyright (c) 2016-2020 qar All rights reserved.
 * <p>
 * https://www.qar.io
 * <p>
 * 版权所有，侵权必究！
 */

package io.qar.commons.security.feign.fallback;

import io.qar.commons.security.feign.AccountFeignClient;
import io.qar.commons.tools.utils.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * 账号接口 FallbackFactory
 *
 * @author Mark sunlightcs@gmail.com
 */
@Slf4j
@Component
public class AccountFeignClientFallbackFactory implements FallbackFactory<AccountFeignClient> {
    @Override
    public AccountFeignClient create(Throwable cause) {
        return null;
    }
//    @Override
//    public AccountFeignClient create(Throwable throwable) {
//        log.error("{}", throwable);
//
//        return username -> new Result<>();
//    }
}
